package com.gaojiawei.multiThread11_ThreadPoolJDk;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class L02_SingleThreadExecutor {
    public static void main(String[] args) {
        ExecutorService singleThreadExecutor = Executors.newSingleThreadExecutor();
        singleThreadExecutor.execute(()->{
            System.out.println(111);
        });
        singleThreadExecutor.execute(()->{
            System.out.println(222);
        });
        singleThreadExecutor.execute(()->{
            System.out.println(333);
        });
        singleThreadExecutor.execute(()->{
            System.out.println(444);
        });

    }
}
